﻿using System;

namespace FlexminAPI
{
	public class PluginInfo
	{
		private string name;
		public string Name
		{
			get { return name; }
		}

		public string RemotingName
		{
			get { return name + "Slave"; }
		}
	
		private string displayName;
		public string DisplayName
		{
			get { return displayName; }
		}

		private string description;
		public string Description
		{
			get { return description; }
		}

		private Version version;
		public Version PluginVersion
		{
			get { return version; }
		}

		private bool resident;
		public bool Resident
		{
			get { return resident; }
		}

		private bool multihost;
		public bool Multihost
		{
			get { return multihost; }
		}

		public PluginInfo(string name, string displayName, string description, Version version, bool resident, bool multihost)
		{
			this.name = name;
			this.displayName = displayName;
			this.description = description;
			this.version = version;
			this.resident = resident;
			this.multihost = multihost;
		}

		public override bool Equals(object obj)
		{
			PluginInfo desc = obj as PluginInfo;
			if (desc == null)
				return false;

			return desc.Name == this.Name && desc.PluginVersion.Equals(this.PluginVersion);
		}
	}
}
